package com.wy.service.impl.wy;

import com.wy.dao.CarsMapper;
import com.wy.model.sys.Cars;
import com.wy.service.wy.CarsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("carsServiceImpl")
public class CarsServiceImpl implements CarsService {

    @Autowired
    private CarsMapper carsMapper;

    @Override
    public List<Cars> carList(int pageSize, int start, String plateNum, String householdName) {
        return carsMapper.carList(pageSize,start,plateNum,householdName);
    }

    @Override
    public Integer carSize(int pageSize, int start, String plateNum, String householdName) {
        return carsMapper.carSize(pageSize,start,plateNum,householdName);
    }

    @Override
    public void insertCar(Cars cars) {
        carsMapper.insert(cars);
    }

    @Override
    public void insertBatch(List<Cars> list) {
        carsMapper.insertBatch(list);
    }

    @Override
    public void updateCar(Cars cars) {
        carsMapper.updateByPrimaryKey(cars);
    }

    @Override
    public void deleteCars(List<String> cid) {
        carsMapper.deleteCars(cid);
    }
}
